home *** CD-ROM | disk | FTP | other *** search
/ Mac OS on the PowerPC Mic…rocessor - In Store Demo / Mac OS on the PowerPC Microprocessor.iso / MacOS / MacOS.dxr / 00095_Misc_script.ls < prev    next >
Encoding:
Text File  |  1996-05-13  |  1.6 KB  |  73 lines

  1. property objMisc, iPrefsFolder
  2.  
  3. on birth me
  4.   if objectp(objMisc) then
  5.     objMisc(mdispose)
  6.   end if
  7.   if the machineType < 256 then
  8.     set objMisc to MISC_X(mnew)
  9.     set iPrefsFolder to objMisc(mPrefsFolder)
  10.   else
  11.     openXLib("Misc_x.dll")
  12.     set objMisc to MISC_X(mnew)
  13.     set iPrefsFolder to objMisc(mWindowsDirectory)
  14.   end if
  15.   return me
  16. end
  17.  
  18. on mClose me
  19.   objMisc(mdispose)
  20.   if the machineType < 256 then
  21.   else
  22.     closeXLib("Misc_x.dll")
  23.   end if
  24. end
  25.  
  26. on mGetPreferenceFolder me
  27.   return iPrefsFolder
  28. end
  29.  
  30. on mFolderExists me, tFolderPath
  31.   return objMisc(mFolderExists, tFolderPath)
  32. end
  33.  
  34. on mInsureFolder me, tFolderPath
  35.   return objMisc(mInsureFolder, tFolderPath)
  36. end
  37.  
  38. on mFileExists me, tFilePath
  39.   return objMisc(mFileExists, tFilePath)
  40. end
  41.  
  42. on mAnswer me, tQuestion, tLeftButtonName, tMiddleButtonName, tRightButtonName
  43.   return objMisc(mAnswer, tQuestion, tLeftButtonName, tMiddleButtonName, tRightButtonName)
  44. end
  45.  
  46. on mAsk me, tQuestion, tDefaultText, tOKButtonName, tCancelButtonName
  47.   return objMisc(mAsk, tQuestion, tDefaultText, tOKButtonName, tCancelButtonName)
  48. end
  49.  
  50. on mGetFolderList me, tFolderPath
  51.   return objMisc(mFolderList, tFolderPath)
  52. end
  53.  
  54. on mFlushActions me
  55.   objMisc(mFlushActions)
  56. end
  57.  
  58. on mGetMegaBytes me, tBytes
  59.   set tTemp to the floatPrecision
  60.   set the floatPrecision to 2
  61.   set tMegs to tBytes / 1024 / 1024
  62.   set the floatPrecision to tTemp
  63.   return tMegs
  64. end
  65.  
  66. on mGetGigaBytes me, tBytes
  67.   set tTemp to the floatPrecision
  68.   set the floatPrecision to 2
  69.   set tGigs to tBytes / 1024 / 1024 / 1024
  70.   set the floatPrecision to tTemp
  71.   return tGigs
  72. end
  73.